package com.the4man.cnbdw.service.impl;

import com.the4man.cnbdw.dao.PunchMachInfoMapper;
import com.the4man.cnbdw.exception.BusinessException;
import com.the4man.cnbdw.service.AbstractService;
import com.the4man.cnbdw.service.PunchMachService;
import com.the4man.framework.model.PunchMachInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by lenovo on 2017/12/12.
 */
@Service("PunchMachService")
public class PunchMachServiceImpl extends AbstractService<PunchMachInfo> implements PunchMachService {
    @Autowired
    PunchMachInfoMapper punchMachMapper;

    public PunchMachServiceImpl() {
    }

    public List<PunchMachInfo> getPunchMachType(String punchMachNo) throws BusinessException, Exception {
        return this.punchMachMapper.getPunchMachType(punchMachNo);
    }

    public int countAllData(String punchMachNo) {
        return this.punchMachMapper.getCountAllData(punchMachNo);
    }

    public int countAllData() {
        return this.punchMachMapper.getCountAllData1();
    }

    public int delete(String id) {
        return this.punchMachMapper.delete(id);
    }

    public PunchMachInfo selectByName(String name) {
        return this.punchMachMapper.selectByName(name);
    }

    public PunchMachInfo selectMByName(String id, String name) {
        return this.punchMachMapper.selectMByName(id, name);
    }
}
